<!DOCTYPE html> 
<html> 
    <head><!--STATUS OK--> 
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
        <title></title> 
        <script src="jquery.js" type="text/javascript"></script> 
        <script type="text/javascript"> 
            $(function(){
        });
        var JSParse = function(str){
            this.str = str.replace(/\r/g, '');
            this.lines = str.split('\n');
            this.KEYWORD = ["break","false","in","this","void",
                "continue","for","new","true","while","delete","function",
                "null","typeof","with","else","if","return","var", "case",
                "debugger","export","super","catch","default","extends",
                "switch","class","do","finally","throw","const","enum",
                "import","try"
            ];
            this.TYPE = {
                KEYWORD:1,
                COMMENT:2,
                STRING:3,
                TYPE:4,
                PUNCTUATION:5
            };
        };

        JSParse.prototype.parse = function(){
            var lines = this.lines;
            var cur = 0, lnum = lines.length, ;
            while(cur < lnum){
                
            }
        };
    </script> 
</head> 
<body>
    <textarea id="code" style="width:95%;height:600px;font:14px/18px Consolas, Monaco, 'Courier New', Courier;">
    <!DOCTYPE html>
    <html>
        <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        <title>Title</title>
            <style type="text/css">
    body{padding:0;margin:0;font-size:12px;font-family:Arial,sans-serif;}
        </style>
        </head>
                    <body>
            
        </body>
    </html>
    </textarea> 
    <div><button onclick="$('#code').indent()">缩进</button></div>
</body> 
</html> 


